package messagesvc.api;


import cn.ucloud.microsf.commonlib.response.EmptyResponse;
import cn.ucloud.microsf.commonlib.response.PageListResponse;
import cn.ucloud.microsf.messagesvc.request.template.TemplateCreateRequest;
import cn.ucloud.microsf.messagesvc.request.template.TemplateListRequest;
import cn.ucloud.microsf.messagesvc.response.template.TemplateResponse;
import cn.ucloud.microsf.springlib.config.MicroSfFeignConfiguration;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 消息模板
 */
@Api(tags = "消息中心-消息模板服务")
@FeignClient(name = "micro-message-svc", contextId = "micro-message-svc-template", configuration = MicroSfFeignConfiguration.class)
public interface TemplateController {

  @ApiOperation(value = "模板列表")
  @GetMapping("/msg/template")
  PageListResponse<TemplateResponse> list(@SpringQueryMap TemplateListRequest request);

  @ApiOperation(value = "模板创建")
  @PostMapping("/msg/template/create")
  EmptyResponse create(@RequestBody TemplateCreateRequest request);

}

